<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/vectrics.tld" prefix="vectrics" %>

<%@ page import="org.vectrics.recruiter.RecruitStart" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="org.vectrics.location.Location" %>
<%@ page import="org.vectrics.hibernate.ThreadProperties" %>

<%
	boolean showCompanySelect = false;

	String domainUriId = ThreadProperties.getUriDomainId();
	String domainId = ThreadProperties.getDomain().getId().toString();

	String formAction = "/public/" + domainUriId + "/job/job_search_results";
%>


<html:form action="<%=formAction%>" method="POST">
	<input type="hidden" name="showStatus" value="false">
	<input type="hidden" name="activeStatus" value="active">
	<table>
		<tr>
			<td valign="top">
				<table>
					<tr>
						<td valign="TOP">
							<table width="600">
								<tr>
									<td valign="top">
										<font class="formLabelClass">
											&nbsp;Search Words
										</font>
									</td>
									<td valign="top">
										<html:text property="searchPhrase" size="50" styleClass="formEditClass" />
									</td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass">
											&nbsp;Function
										</font>
									</td>
									<td valign="top">
										<vectrics:jobFunctionCombo property="functionCode" styleClass="formComboClass" any="true"/>
									</td>
								</tr>
								
								<tr>
									<td valign="top">
										<font class="formLabelClass">
											&nbsp;Location
										</font>
									</td>
									<td valign="top">
										<vectrics:locationCombo 
											domainId="<%=domainId%>" 
											property="location" 
											locationType="job.location"
											styleClass="formComboClass"/>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass">
											&nbsp;Time Span
										</font>
									</td>
									
									<td valign="top">
										<html:select property="postedStartTime" styleClass="formComboClass">
											<option selected value="168">Past 7 Days</option>
											<option value="720">Past 1 Month</option>
											<option value="1440">Past 2 Months</option>
											<option value="4320">Past 6 Months</option>
										</html:select>
									</td>
								</tr>
								
					<% if (showCompanySelect) { %>
								<tr>
									<td colspan="2"><br>
										<vectrics:companySelector />	
									</td>
								</tr>
					<% } %>
								
								<tr>
									<td valign="TOP" align="left"></td>
									<td valign="TOP" align="left">
										<vectrics:formButton name="submit" code="public.button.ok" phraseCode="button.ok"/>
									</td>
								</tr>
							</table>
						</td>
						<td valign="TOP" width="50"></td>
						<td valign="TOP">
							<table></table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</html:form>
